package me.ereach.internalback.controller;

import me.ereach.internalback.mapper.VXHEmployeeMapper;
import me.ereach.internalback.viewmodel.VXHEmployee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/sys")
public class CtrlVXHEmployees {
    @Autowired
    private VXHEmployeeMapper vxhEmployeeMapper;

    @GetMapping("/employee")
    public List<VXHEmployee> getVXHEmployee() {
        List<VXHEmployee> vxhEmployees = vxhEmployeeMapper.selectList(null);
        return vxhEmployees;
    }
}
